package com.sinozo.errcode;

import java.text.MessageFormat;

/**
 * 前端错误码
 *
 * 10000 - 10010 邮箱
 * @author by zhehen.lu
 * @date 2023/12/11 11:53
 */
public enum FrontErrorCode implements ErrorCode {
    GOOGLE_EMAIL_SENDING_EXCEPTION("10001", "谷歌邮箱发送异常！"),
    ;
    private String code;
    private String msg;

    FrontErrorCode(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getMsg(Object... args) {
        return MessageFormat.format(getMsg(), args);
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
